package com.taoym.voucher.common.enums;

import lombok.Getter;

/**
 * @coder taoym
 * @datetime 2021/6/29 14:35
 * @desc
 */
@Getter
public enum ActInfoEnum {

    // 饿了么
    ELM_WM(3, "0.8", ActivityPlatformEnum.ELM.getCode(), "饿了么外卖", 1, "icon-ic_eliaomo"),
    ELM_CY(4, "0.8", ActivityPlatformEnum.ELM.getCode(), "饿了么餐饮", 0, "icon-canyinzhusu"),
    ELM_SX(5, "0.8", ActivityPlatformEnum.ELM.getCode(), "饿了么生鲜", 0, "icon-guoshu"),
    // 美团
    MT_WM(1, "0.85", ActivityPlatformEnum.MEI_TUAN.getCode(), "美团外卖", 1, "icon-_meituan"),
    MT_SG(2, "0.85", ActivityPlatformEnum.MEI_TUAN.getCode(), "美团闪购", 0, "icon-guoshu"),
    MT_TJ(27, "0.85", ActivityPlatformEnum.MEI_TUAN.getCode(), "周末特价", 0, "icon-jinritejia"),
    MT_JD(28, "0.85", ActivityPlatformEnum.MEI_TUAN.getCode(), "美团酒店", 0, "icon-jiudian"),
    MT_CX(29, "0.85", ActivityPlatformEnum.MEI_TUAN.getCode(), "优选促销", 0, "icon-cuxiao"),

    // 拼多多
    PDD_HF(6, "0.85", ActivityPlatformEnum.PDD.getCode(), "话费充值", 0, "icon-huafeichongzhi1"),
    PDD_HCP(11, "0.85", ActivityPlatformEnum.PDD.getCode(), "火车票", 0, "icon-huoche"),
    PDD_XSMS(12, "0.85", ActivityPlatformEnum.PDD.getCode(), "限时秒杀", 0, "icon-miaosha"),
    PDD_BYBT(13, "0.85", ActivityPlatformEnum.PDD.getCode(), "百亿补贴", 0, "icon-butie"),
    PDD_LQZX(14, "0.85", ActivityPlatformEnum.PDD.getCode(), "领券中心", 0, "icon-lingquanzhongxin"),
    // 聚合
    KFC(16, "0.85", ActivityPlatformEnum.JU_HE.getCode(), "肯德基", 0, ""),
    CINEMA(17, "0.85", ActivityPlatformEnum.JU_HE.getCode(), "电影票", 0, ""),
    HUA_FEI(18, "0.85", ActivityPlatformEnum.JU_HE.getCode(), "话费", 0, ""),
    MCDONALD(26, "0.85", ActivityPlatformEnum.JU_HE.getCode(), "麦当劳", 0, ""),

    JD(19, "0.85", ActivityPlatformEnum.JD.getCode(), "京东电商", 0, ""),
    WPH(39, "0.85", ActivityPlatformEnum.WPH.getCode(), "唯品会", 0, ""),
    ;

    private final Integer actId;
    private final String rate;
    private final Integer platform;
    private final String actName;
    private final Integer mainAct;
    private final String icon;

    ActInfoEnum(Integer actId, String rate, Integer platform, String actName, Integer mainAct, String icon) {
        this.actId = actId;
        this.rate = rate;
        this.platform = platform;
        this.actName = actName;
        this.mainAct = mainAct;
        this.icon = icon;
    }

    public static ActInfoEnum getInstance(Integer actId) {
        for (ActInfoEnum value : values()) {
            if (actId.equals(value.actId)) {
                return value;
            }
        }
        return null;
    }
}
